﻿<Window x:Class="Wallace.IDE.SalesForce.UI.NewLogParametersWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:system="clr-namespace:System;assembly=mscorlib"
        xmlns:salesForceData="clr-namespace:SalesForceData;assembly=SalesForceData"
        Title="New Log Parameters" 
        Height="500" 
        Width="550"
        MinHeight="200"
        MinWidth="200"        
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        Style="{StaticResource ChromeWindowStyle}"
        Background="{StaticResource CaptionBackgroundBrush}">

    <Window.Resources>
        <ObjectDataProvider x:Key="logLevelEnum" 
                            MethodName="GetValues"
                            ObjectType="{x:Type system:Enum}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="salesForceData:LogLevel"/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Window.Resources>
    
    <Border Padding="5,5,20,5">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            
            <TextBlock Text="Scope:"
                       Grid.Row="0"
                       FontWeight="Bold"
                       Margin="5"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Grid.Column="0"/>
            
            <TextBox x:Name="textBoxScope"                      
                     Grid.Row="0"
                     Grid.Column="1"
                     Grid.ColumnSpan="7"
                     Margin="0,5,5,5"
                     IsReadOnly="True"/>

            <TextBlock Text="Traced Entity:"
                       Grid.Row="1"
                       FontWeight="Bold"
                       Margin="5"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Grid.Column="0"/>

            <Button x:Name="buttonTracedEntity" 
                    Grid.Row="1"
                    Grid.Column="1"
                    Grid.ColumnSpan="7"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    HorizontalContentAlignment="Left"
                    Margin="0,5,5,5"
                    Click="buttonTracedEntity_Click"/>

            <TextBlock Text="Expiration Date:"
                       Grid.Row="2"
                       FontWeight="Bold"
                       Margin="5"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Grid.Column="0"/>
            
            <TextBox x:Name="textBoxExpirationDate" 
                     Grid.Row="2"
                     Grid.Column="1"
                     Margin="0,5,5,5"
                     IsReadOnly="True"/>
            
            <TextBlock Text="Log Levels"
                       Grid.Row="3"
                       Grid.Column="1"
                       Grid.ColumnSpan="7"
                       FontWeight="Bold"
                       HorizontalAlignment="Center"
                       Margin="5,10,5,5"/>

            <TextBlock Text="Code:"
                       Grid.Row="4"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="5"/>
            
            <ComboBox x:Name="comboBoxCode"
                      Grid.Row="4"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <TextBlock Text="VisualForce:"
                       Grid.Row="5"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="5"/>

            <ComboBox x:Name="comboBoxVisualForce"
                      Grid.Row="5"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <TextBlock Text="Profiling:"
                       Grid.Row="6"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="5"/>

            <ComboBox x:Name="comboBoxProfiling"
                      Grid.Row="6"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <TextBlock Text="Callout:"
                       Grid.Row="7"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="8"/>

            <ComboBox x:Name="comboBoxCallout"
                      Grid.Row="7"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <TextBlock Text="Database:"
                       Grid.Row="8"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="5"/>

            <ComboBox x:Name="comboBoxDatabase"
                      Grid.Row="8"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <TextBlock Text="System:"
                       Grid.Row="9"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="5"/>

            <ComboBox x:Name="comboBoxSystem"
                      Grid.Row="9"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <TextBlock Text="Validation:"
                       Grid.Row="10"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="5"/>

            <ComboBox x:Name="comboBoxValidation"
                      Grid.Row="10"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <TextBlock Text="Workflow:"
                       Grid.Row="11"
                       Grid.Column="0"
                       FontWeight="Bold"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"
                       Margin="5"/>

            <ComboBox x:Name="comboBoxWorkflow"
                      Grid.Row="11"
                      Grid.Column="1"
                      HorizontalAlignment="Stretch"
                      SelectedIndex="0"
                      ItemsSource="{Binding Source={StaticResource logLevelEnum}}"/>

            <StackPanel Grid.Row="12"
                        Grid.ColumnSpan="2"
                        Orientation="Horizontal"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Bottom">

                <Button x:Name="buttonCreate"
                        Margin="5"
                        Padding="10,5,10,5"
                        Click="buttonCreate_Click">Create</Button>

                <Button Margin="5"
                        Padding="10,5,10,5"
                        Click="buttonCancel_Click">Cancel</Button>

            </StackPanel>
        </Grid>
    </Border>
</Window>
